import request from "./request"
import qs from "qs"
export const JingPinAPI = () => request.get("/products/recommend")
//热门兑换
export const HotAPI = () => request.get("/products/hot")
export const sendMSMAPI = (params) => request.post("/sendSMS", qs.stringify(params))
export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params))
export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params))
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params))

export const UserProfilesAPI = () => request.get("/shop/userProfiles")
//详情页面
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`)

//购物车
export const CartAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params))

export const GoodListAPI = (params) => request.get("/products", { params })//params:params
///查看购物车
export const CartsAPI = () => request.get("shop/carts")
//删除购物车
export const DelCartsAPI = (params) => request.delete("/shop/carts", { params })